package org.chen.aao.common.user.dto;

import lombok.Data;
import javax.validation.constraints.*;

@Data
public class RegisterRequest {
    @NotBlank(message = "邮箱不能为空")
    @Email(message = "邮箱格式不正确")
    private String email;
    
    @NotBlank(message = "用户名不能为空")
    @Pattern(regexp = "^[a-zA-Z0-9_]{2,20}$", 
            message = "用户名必须为2-20个字符，只能包含字母、数字和下划线")
    private String username;
    
    @NotBlank(message = "密码不能为空")
    @Pattern(regexp = "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d).{8,}$",
            message = "密码必须至少8位，包含大小写字母和数字")
    private String password;
    
    @Size(min = 6, max = 6, message = "验证码必须为6位")
    private String verificationCode;  // 可选，如果提供则验证
}